<template>
  <div class="act_modal_outer" @click="hideToastModal">
    <div class="modal_inner">
      <image class="modal_img" :mode="'aspectFill'" src="~@/static/sports/act_noStart.png" v-if="act_type == 0"></image>
      <image class="modal_img" :mode="'aspectFill'" src="~@/static/sports/act_end.png" v-if="act_type == 1"></image>
      <span class="moadl_text">{{ text }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "sportsModal",
  props:{
    act_type: {
      type:Number,
      default: 0
    }
  },
  data(){
    return{
      text:'',
    }
  },
  methods:{
    hideToastModal(){
      this.$emit('hideToastModal')
    }
  },
  mounted() {
    if(this.act_type == 0){
      this.text = '活动未开启'
    }
    if(this.act_type == 1){
      this.text = '活动已结束'
    }
  }
}
</script>

<style scoped lang="scss">
@import '../../common/common.scss';
.act_modal_outer{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index:12;
  .modal_inner{
    position: absolute;
    @include center;
    width: 640rpx;
    height: 600rpx;
    background: #ffffff;
    border-radius: 30rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    .modal_img{
      width: 300rpx;
      height: 300rpx;
    }
    .moadl_text{
      color: #222222;
      font-size: 30rpx;
    }
  }
}
</style>